import React, { useEffect ,useState} from 'react'
import './index.css'
import { getCardlist } from '../../../api/request'
import Loading from '../../../components/Loading'
import CardList from '../../../components/CardList'



export default function Found() {
  const [show,setShow]=useState(true)
  const [listData,setListData]=useState([])
  useEffect(()=>{
    (async()=>{
        let {data}=await getCardlist()
        setListData(data)
        setShow(false)
    })()
})
  return (
   
    show ?<Loading/>:
      <CardList list={listData}></CardList>

  )
}
